package com.petlab.service.impl;

import java.util.ArrayList;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.petlab.dao.RoleAuthorityDao;
import com.petlab.model.RoleAuthority;
import com.petlab.service.RoleAuthorityService;

@Component("roleAuthorityService")
public class RoleAuthorityServiceImpl implements RoleAuthorityService {

	private RoleAuthorityDao roleAuthorityDao;

	public RoleAuthorityDao getRoleAuthorityDao() {
		return roleAuthorityDao;
	}

	@Resource
	public void setRoleAuthorityDao(RoleAuthorityDao roleAuthorityDao) {
		this.roleAuthorityDao = roleAuthorityDao;
	}

	public void add(com.petlab.model.RoleAuthority roleAuthority) {
		roleAuthorityDao.saveRoleAuth(roleAuthority);
	}
	public ArrayList<RoleAuthority> getRolesByRolename(String rolename) {
		// TODO Auto-generated method stub
		return roleAuthorityDao.getRoleByRolename(rolename);
	}

}
